<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use kartik\select2\Select2;
 

?>

<style type="text/css">
    .field-productsearch-customer_id{width: 200px;}
</style>
<div class="product-search">

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'layout' => 'inline',
    ]); ?>


    <?= $form->field($model, 'customer_id')->widget(Select2::classname(), [
                'data' => $customer,
                'language' => 'zh-cn',
                'options' => ['placeholder' => '选择客户'],
                'pluginOptions' => [
                    'allowClear' => true,
                ],
            ]) ?> 

    <?= $form->field($model, 'name')->textInput(['placeholder'=>Yii::t('app.product', 'Name')]) ?>
    <?= $form->field($model, 'code')->textInput(['placeholder'=>Yii::t('app.product', 'Code')]) ?>


    <div class="form-group">
        <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
